class Animal {
    constructor(name){
        this.name = name;
    }
    eat(){
        console.log(`${this.name}在吃东西`);
    }

    static isAnimal(obj){
        console.log(obj instanceof Animal);
    }
}

class Dog extends Animal {
    constructor(name){
        super(name);
    }
}

class Person {
    constructor(name){
        this.name = name;
    }
}

let dog = new Dog('小狗');
dog.eat();

let p = new Person("小明");

Dog.isAnimal(dog);
Dog.isAnimal(p);